﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="ProfileEdition.aspx.cs" Inherits="LiveCPEProject.profile.ProfileEdition" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="Panel1" runat="server" CssClass="panel" Width="500px">
        <h1><asp:Label ID="Subtitle" runat="server"></asp:Label></h1>

        <asp:Label ID="LabelFirstName" Runat="server" Text="<%$ Resources:LocalizedText, Profile_FirstName %>" CssClass="field"></asp:Label>
        <asp:TextBox ID="TextBoxFirstName" runat="server" OnTextChanged="UpdateOrCreate"></asp:TextBox>
        <asp:FilteredTextBoxExtender ID="TextBoxFirstName_FilteredTextBoxExtender" 
            runat="server" Enabled="True" TargetControlID="TextBoxFirstName" FilterType="LowercaseLetters, UppercaseLetters, Custom" ValidChars="éèëêîïìôöòûüùâäà-" >
        </asp:FilteredTextBoxExtender>
        <asp:RequiredFieldValidator ID="TextBoxFirstName_RequiredFieldValidator" ControlToValidate="TextBoxFirstName" runat="server" ErrorMessage="<%$ Resources:LocalizedText, Common_RequiredField %>" CssClass="errorMessage"></asp:RequiredFieldValidator>
        <br />
        <asp:Label ID="LabelLastName" Runat="server" Text="<%$ Resources:LocalizedText, Profile_LastName %>" CssClass="field"></asp:Label>
        <asp:TextBox ID="TextBoxLastName" runat="server" OnTextChanged="UpdateOrCreate"></asp:TextBox>
        <asp:FilteredTextBoxExtender ID="TextBoxLastName_FilteredTextBoxExtender" 
            runat="server" Enabled="True" TargetControlID="TextBoxLastName" FilterType="LowercaseLetters, UppercaseLetters, Custom" ValidChars="éèëêîïìôöòûüùâäà-" >
        </asp:FilteredTextBoxExtender>
        <asp:RequiredFieldValidator ID="TextBoxLastName_RequiredFieldValidator" ControlToValidate="TextBoxLastName" runat="server" ErrorMessage="<%$ Resources:LocalizedText, Common_RequiredField %>" CssClass="errorMessage"></asp:RequiredFieldValidator>
        <br />
        <asp:Label ID="LabelGender" Runat="server" Text="<%$ Resources:LocalizedText, Profile_Gender %>" CssClass="radio"></asp:Label>
        <asp:Label ID="LabelGenderMale" Runat="server" Text="<%$ Resources:LocalizedText, Profile_GenderMale %>" CssClass="subfield"></asp:Label>
        <asp:RadioButton ID="RadioButtonGender_Male" runat="server" OnCheckedChanged="UpdateOrCreate" ValidationGroup="ValidationGroupGender" Checked="true" GroupName="GenderGroup" CssClass="radiobutton" />
        <asp:Label ID="LabelGenderFemale" Runat="server" Text="<%$ Resources:LocalizedText, Profile_GenderFemale %>" CssClass="subfield"></asp:Label>
        <asp:RadioButton ID="RadioButtonGender_Female" runat="server" OnCheckedChanged="UpdateOrCreate" ValidationGroup="ValidationGroupGender" GroupName="GenderGroup" CssClass="radiobutton" Width="120px" />
        <br />
        <asp:Label ID="LabelDateOfBirth" Runat="server" Text="<%$ Resources:LocalizedText, Profile_DateOfBirth %>" CssClass="field"></asp:Label>
        <asp:TextBox ID="TextBoxDateOfBirth" runat="server" OnTextChanged="UpdateOrCreate"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidatorDateOfBirth" ControlToValidate="TextBoxDateOfBirth" runat="server" ErrorMessage="<%$ Resources:LocalizedText, Common_RequiredField %>" CssClass="errorMessage"></asp:RequiredFieldValidator>
        <asp:CalendarExtender ID="TextBoxDateOfBirth_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="TextBoxDateOfBirth"/>
        <asp:RegularExpressionValidator ID="RegularExpressionValidatorDateOfBirth" runat="server" ControlToValidate="TextBoxDateOfBirth" ErrorMessage="<%$ Resources:LocalizedText, Common_InvalidField %>" ValidationExpression="^[0-9]{2}[/][0-9]{2}[/][0-9]{4}" CssClass="errorMessage" />
        <br />
        <asp:Label ID="LabelEmail" Runat="server" Text="<%$ Resources:LocalizedText, Profile_Email %>" CssClass="field"></asp:Label>
        <asp:TextBox ID="TextBoxEmail" runat="server" OnTextChanged="UpdateOrCreate"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidatorEmail" ControlToValidate="TextBoxEmail" runat="server" ErrorMessage="<%$ Resources:LocalizedText, Common_RequiredField %>" CssClass="errorMessage"></asp:RequiredFieldValidator>
        <asp:RegularExpressionValidator ID="TextBoxEmail_RegularExpressionValidator" runat="server" ControlToValidate="TextBoxEmail" ErrorMessage="<%$ Resources:LocalizedText, Common_InvalidField %>" ValidationExpression="^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]{2,}[.][a-zA-Z]{2,3}" CssClass="errorMessage" />
        <br />
        <asp:Image ID="ImageUploaded" runat="server" Height="120px" Width="100px" Visible="false" />
        <br />
        <input ID="FileUploader" runat="server" type="file" />
        <asp:Label ID="UploadLabel" runat="server" />
        <br />
        <asp:Button ID="ButtonUpdateOrCreate" runat="server" onclick="UpdateOrCreateUser" Text="<%$ Resources:LocalizedText, Profile_ButtonValidation %>" CssClass="button" />
        <asp:Button ID="ButtonClearFields" runat="server" onclick="ClearFields" Text="<%$ Resources:LocalizedText, Profile_ButtonClearFields %>" CssClass="button" />
    </asp:Panel>
    <asp:DropShadowExtender ID="Panel1_DropShadowExtender" runat="server" 
        Enabled="True" TargetControlID="Panel1" Rounded="true" Opacity="0.3" TrackPosition="true">
    </asp:DropShadowExtender>
</asp:Content>
